#ifndef DAP_ACCESS_H
#define DAP_ACCESS_H
#include"swd.h"
#define CM3
#ifdef CM3
#include "ARM_CM3.h"
#endif
#define opcode_OR   (0u)
#define opcode_AND  (1u)
#define opcode_XOR  (2u)

unsigned int AHB_Read(unsigned int Addr,unsigned char *data,unsigned int len);
unsigned int AHB_WriteByte(unsigned int Addr,unsigned char data);
unsigned int AHB_WriteHalfWord(unsigned int Addr,unsigned short data);
unsigned int AHB_WriteWord(unsigned int Addr,unsigned int data);
unsigned int AHB_BlockWrite(unsigned int Addr,unsigned char *data,unsigned int len);
unsigned int LoopWordReadReady(unsigned int Addr);
unsigned int AHB_ReadWriteWord(unsigned int addr,unsigned int wData,unsigned int opcode);
#endif